var regionGdp=null;
$(function () {
    regionGdp=new RegionGdp();
});
(function(){
    var RegionGdp = window.RegionGdp = function(){
        return new RegionGdp.prototype.init();

    };
    RegionGdp.fn = RegionGdp.prototype = {


        init:function () {
            this.initEvent();
            return this;
        },

        initEvent:function () {
            var that=this;
            var checkName=that.getQueryString("checkName");
           $("#J_selectCheckName").val(checkName);
            var checkStatus=that.getQueryString("checkStatus");
            $("#J_selectCheckStatus").val(checkStatus);
            var reviewStatus=that.getQueryString("reviewStatus");
            $("#J_selectIsAudit").val(reviewStatus);
            var applyItem=that.getQueryString("applyItem");
            $("#J_selectApplyItem").val(applyItem);
            
            $("#J_export").on("click",function () {
                var url= '/admin/gdp/regionGdp/export?name='+name+"&applyItem="
                    +applyItem+"&reviewStatus="+reviewStatus+"&checkName="+checkName+"&checkStatus="+checkStatus;
                window.open(url);
                // $.get("/admin/gdp/regionGdp/export", { name:name,
                //     applyItem:applyItem,
                //     reviewStatus:reviewStatus,
                //     checkName:checkName,
                //     checkStatus:checkStatus});
                // $.get({
                //     url : '/admin/gdp/regionGdp/export',
                //     data : {
                //         name:name,
                //         applyItem:applyItem,
                //         reviewStatus:reviewStatus,
                //         checkName:checkName,
                //         checkStatus:checkStatus
                //     },
                //     type : 'get',
                //     success : function(result) {
                //         debugger
                //         layer.alert("导出成功")
                //     }
                // });
            })
        },

        getQueryString:function (name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = decodeURI(window.location.search).substr(1).match(reg); //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
    };
    RegionGdp.fn.init.prototype = RegionGdp.fn;
})();